#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
@File    :   py_sub.py
@Time    :   2025/10/19 18:37:10
@user    :   wk 
@Version :   1.0
@Desc    :   None
'''

import rospy
from std_msgs.msg import String

class Sub:
    def __init__(self) -> None:
        rospy.init_node("py_sub")
        self.sub = rospy.Subscriber("data",String,self.sub_callback)
        
    def sub_callback(self, msg):
        rospy.loginfo(msg.data)

if __name__ == '__main__':
    Sub()
    rospy.spin()